package com.momo.mapper.mapper;

import com.momo.mapper.dataobject.PromoDO;
import org.apache.ibatis.annotations.Param;

/**
 * 由于需要对分页支持,请直接使用对应的DAO类
 * 注意:此结构有系统生成,禁止手工修改,以免被覆盖,请通过dalgen生成
 * The Table PROMO.
 * PROMO
 */
public interface PromoDOMapper{

    /**
     * desc:插入表:PROMO.<br/>
     * descSql =  SELECT LAST_INSERT_ID() INSERT INTO PROMO( PROMO_NAME ,ITEM_ID ,END_DATE ,START_DATE ,PROMO_ITEM_PRICE )VALUES( #{promoName,jdbcType=VARCHAR} ,#{itemId,jdbcType=INTEGER} ,#{endDate,jdbcType=TIMESTAMP} ,#{startDate,jdbcType=TIMESTAMP} ,#{promoItemPrice,jdbcType=DECIMAL} )
     * @param entity entity
     * @return int
     */
    int insert(PromoDO entity);
    /**
     * desc:更新表:PROMO.<br/>
     * descSql =  UPDATE PROMO SET PROMO_NAME = #{promoName,jdbcType=VARCHAR} ,ITEM_ID = #{itemId,jdbcType=INTEGER} ,END_DATE = #{endDate,jdbcType=TIMESTAMP} ,START_DATE = #{startDate,jdbcType=TIMESTAMP} ,PROMO_ITEM_PRICE = #{promoItemPrice,jdbcType=DECIMAL} WHERE ID = #{id,jdbcType=INTEGER}
     * @param entity entity
     * @return int
     */
    int update(PromoDO entity);
    /**
     * desc:根据主键删除数据:PROMO.<br/>
     * descSql =  DELETE FROM PROMO WHERE ID = #{id,jdbcType=INTEGER}
     * @param id id
     * @return int
     */
    int deleteById(Integer id);
    /**
     * desc:根据主键获取数据:PROMO.<br/>
     * descSql =  SELECT * FROM PROMO WHERE ID = #{id,jdbcType=INTEGER}
     * @param id id
     * @return PromoDO
     */
    PromoDO getById(Integer id);
}
